package com.zone.module_base.repository

import androidx.paging.DataSource
import kotlinx.coroutines.CoroutineScope

class PageDataSourceFactory<T>(private val block: suspend CoroutineScope.(pageNum: Int, pageSize: Int) -> List<T>) :
    DataSource.Factory<Int, T>() {
    override fun create(): DataSource<Int, T> {
        return PageDataSource(block)
    }
}